use rbatis::{crud, impl_select, impl_select_page};

#[derive(Clone, Debug, serde::Serialize, serde::Deserialize)]
pub struct User {
    pub id: Option<i32>,
    pub area: Option<String>,
    pub age: Option<i32>,
    pub active: Option<i32>,
}
crud!(User {});
impl_select!(User{select_by_id(id:i32) => "`where id = #{id} limit 1`"});
impl_select_page!(User{select_page(id:i32) => r#"`where id between #{id} and 100000 `"#});